import { configure, getLogger, Logger } from 'log4js';

configure({
    appenders: { paymentLog: { type: 'dateFile', 
                        filename: './log/paymentLog.log', 
                        keepFileExt: true, 
                        daysToKeep: 1,
                        pm2: true},
                default: {
                    type: 'dateFile', 
                    filename: './log/default.log', 
                    keepFileExt: true, 
                    daysToKeep: 7,
                    pm2: true}
    },
    categories: { 
        paymentLog: { appenders: ['paymentLog'], level: 'trace' },
        default: { appenders: ['default'], level: 'trace' }
    }
});

export var PaymentLogger: Logger = getLogger('paymentLog');
export var DefaultLogger: Logger = getLogger('default');


